<admintpl file="header" />
<body class="J_scroll_fixed">
<div class="wrap J_check_wrap">
   <div class="nav">
    <ul class="cc">
      <li class="current"><a href="{:U('slide/index')}">所有幻灯片</a></li>
      <li ><a href="{:U('slide/add')}" >添加幻灯片</a></li>
    </ul>
  </div>
  <div class="h_a">搜索</div>
  <form method="post" id="cid_form"> 
    <div class="search_type cc mb10">
      <div class="mb10"> 
        <select class="select_2" name="cid"style="width:100px;" id="selected_cid">
          <option value=''>全部</option>
          <foreach name="categorys" item="vo">
          	<php>$cid_select=$vo['cid']===$slide_cid?"selected":"";</php>
          	<option value="{$vo.cid}" {$cid_select}>{$vo.cat_name}</option>
          </foreach>
        </select>
      </div>
    </div>
  </form>
  <form class="J_ajaxForm" action="" method="post">
    <div class="table_list">
      <table width="100%">
        <thead>
	          <tr>
	            <td width="16"><label><input type="checkbox" class="J_check_all" data-direction="x" data-checklist="J_check_x"></label></td>
	            <td width="50">排序</td>
	            <td width="100">ID</td>
	            <td>标题</td>
	            <td>描述</td>
	            <td width="120">操作</td>
	          </tr>
        </thead>
        	<foreach name="slides" item="vo">
	        	<tr>
		            <td><input type="checkbox" class="J_check" data-yid="J_check_y" data-xid="J_check_x" name="ids[]" value="{$vo.slide_id}"></td>
		            <td><input name='listorders[{$vo.slide_id}]' class="input mr5"  type='text' size='3' value='{$vo.listorder}'></td>
		            <td>{$vo.slide_id}</td>
		            <td>{$vo.slide_name}</td>
	            	<td>{$vo.slide_des}</td>
		            <td>
		            	<a href="{:U('slide/edit',array('id'=>$vo['slide_id']))}">修改</a>|
		            	<a href="{:U('slide/delete',array('id'=>$vo['slide_id']))}" class="J_ajax_del" >删除</a>
					</td>
	          	</tr>
          </foreach>
          </table>
      <div class="p10"><div class="pages">  </div> </div>
     
    </div>
    <div>
      <div class="btn_wrap_pd">
        <label class="mr20"><input type="checkbox" class="J_check_all" data-direction="y" data-checklist="J_check_y">全选</label>  
        <button class="btn J_ajax_submit_btn" type="submit" data-action="{:u('slide/listorders')}">排序</button>              
        <button class="btn J_ajax_submit_btn" type="submit" data-action="{:U('slide/delete')}" data-subcheck="true" >删除</button>
      </div>
    </div>
  </form>
</div>
<script src="__ROOT__/statics/js/common.js?{$js_debug}"></script>
<script>
setCookie('refersh_time', 0);
function refersh_window() {
    var refersh_time = getCookie('refersh_time');
    if (refersh_time == 1) {
        window.location.reload();
    }
}
setInterval(function(){
	refersh_window()
}, 3000);
$(function () {
	$("#selected_cid").change(function(){
		$("#cid_form").submit();
	});
});

</script>
</body>
</html>